home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_Patterns / PSWDrawingWraps.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  5.5 KB  |  182 lines

  1. /* PSWDrawingWraps.c generated from PSWDrawingWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "PSWDrawingWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42.  *    PSWDrawingWraps.psw
  43.  *
  44.  *    Version:    2.0
  45.  *    Author:    Ken Fromm
  46.  *    History:
  47.  *            03-07-91        Added this comment.
  48.  */
  49. #line 50 "PSWDrawingWraps.c"
  50. void PSWMarkTime( void )
  51. {
  52.   typedef struct {
  53.     unsigned char tokenType;
  54.     unsigned char topLevelCount;
  55.     unsigned short nBytes;
  56.  
  57.     DPSBinObjGeneric obj0;
  58.     DPSBinObjGeneric obj1;
  59.     DPSBinObjGeneric obj2;
  60.     } _dpsQ;
  61.   static const _dpsQ _dpsStat = {
  62.     DPS_DEF_TOKENTYPE, 3, 28,
  63.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* StartTime */
  64.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  65.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  66.     }; /* _dpsQ */
  67.   _dpsQ _dpsF;    /* local copy  */
  68.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  69.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  70.   static long int _dpsCodes[1] = {-1};
  71.   {
  72. if (_dpsCodes[0] < 0) {
  73.     static const char * const _dps_names[] = {
  74.     "StartTime"};
  75.     long int *_dps_nameVals[1];
  76.     _dps_nameVals[0] = &_dpsCodes[0];
  77.  
  78.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  79.     }
  80.   }
  81.  
  82.   _dpsF = _dpsStat;    /* assign automatic variable */
  83.  
  84.   _dpsP[0].val.nameVal = _dpsCodes[0];
  85.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  86. }
  87. #line 44 "PSWDrawingWraps.psw"
  88.  
  89. #line 90 "PSWDrawingWraps.c"
  90. void PSWReturnTime(int *ElapsedTime)
  91. {
  92.   typedef struct {
  93.     unsigned char tokenType;
  94.     unsigned char topLevelCount;
  95.     unsigned short nBytes;
  96.  
  97.     DPSBinObjGeneric obj0;
  98.     DPSBinObjGeneric obj1;
  99.     DPSBinObjGeneric obj2;
  100.     DPSBinObjGeneric obj3;
  101.     DPSBinObjGeneric obj4;
  102.     DPSBinObjGeneric obj5;
  103.     DPSBinObjGeneric obj6;
  104.     DPSBinObjGeneric obj7;
  105.     DPSBinObjGeneric obj8;
  106.     } _dpsQ;
  107.   static const _dpsQ _dpsStat = {
  108.     DPS_DEF_TOKENTYPE, 9, 76,
  109.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  110.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* StartTime */
  111.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  112.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  113.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  114.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  115.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  116.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  117.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  118.     }; /* _dpsQ */
  119.   _dpsQ _dpsF;    /* local copy  */
  120.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  121.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  122.   static long int _dpsCodes[1] = {-1};
  123.   DPSResultsRec _dpsR[1];
  124.   static const DPSResultsRec _dpsRstat[] = {
  125.     { dps_tInt, -1 },
  126.     };
  127.     _dpsR[0] = _dpsRstat[0];
  128.     _dpsR[0].value = (char *)ElapsedTime;
  129.  
  130.   {
  131. if (_dpsCodes[0] < 0) {
  132.     static const char * const _dps_names[] = {
  133.     "StartTime"};
  134.     long int *_dps_nameVals[1];
  135.     _dps_nameVals[0] = &_dpsCodes[0];
  136.  
  137.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  138.     }
  139.   }
  140.  
  141.   _dpsF = _dpsStat;    /* assign automatic variable */
  142.  
  143.   _dpsP[1].val.nameVal = _dpsCodes[0];
  144.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  145.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  146.   DPSAwaitReturnValues(_dpsCurCtxt);
  147. }
  148. #line 49 "PSWDrawingWraps.psw"
  149.  
  150. #line 151 "PSWDrawingWraps.c"
  151. void PSWRectFillArray(float Array[], int i)
  152. {
  153.   typedef struct {
  154.     unsigned char tokenType;
  155.     unsigned char topLevelCount;
  156.     unsigned short nBytes;
  157.  
  158.     DPSBinObjGeneric obj0;
  159.     DPSBinObjGeneric obj1;
  160.     } _dpsQ;
  161.   static const _dpsQ _dpsStat = {
  162.     DPS_DEF_TOKENTYPE, 2, 20,
  163.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 16},    /* param[var]: Array */
  164.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  165.     }; /* _dpsQ */
  166.   _dpsQ _dpsF;    /* local copy  */
  167.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  168.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  169.   register int _dps_offset = 16;
  170.   _dpsF = _dpsStat;    /* assign automatic variable */
  171.  
  172.   _dpsP[0].length = i;
  173.   _dpsP[0].val.arrayVal = _dps_offset;
  174.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  175.  
  176.   _dpsF.nBytes = _dps_offset+4;
  177.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,20);
  178.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Array, i);
  179. }
  180. #line 53 "PSWDrawingWraps.psw"
  181.  
  182.